home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
remote
/
rafm111.zip
/
RAFMSTR.DOC
< prev
next >
Wrap
Text File
|
1991-11-17
|
18KB
|
435 lines
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
╒═════════════════════════════════════════════════════════════╕
│░░░ Introduction ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
This document describes the structures of the datafiles used
by RAFM and how to use them.
The mentioned Flagtype is an array of 4 bytes, declared as:
Type
FlagType = Array[1..4] of byte;
╒═════════════════════════════════════════════════════════════╕
│░░░ RAFMAREA.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
The file RAFMAREA.DAT contains all information about the used
areas. It has a fixed length of 30600 bytes and consists of
200 records.
Type
AreaRecord = Record
Name : String[60];
Free : Boolean;
Filepath : String[50];
Security : Word;
Flags : Flagtype;
PrivateSec : Word;
PrivateFlags : Flagtype;
Password : String[15];
Header : String[8];
PassOk : Boolean;
Protected : Boolean;
ProcessArch : Boolean;
End;
Field descriptions:
Name : The name of this area.
Free : If TRUE, users can download all files for
free from this area.
Filepath : Directory where uploaded files are stored,
when not using the restrict uploads option.
Security : Minimum security-level to access this area.
Flags : Flags required to access this area.
PrivateSec : Minimum security-level to access private
───────────────────────────────────────────────────────────────
Page: 1
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
files in this area.
PrivateFlags : Flags required to access private files in
this area.
Password : Password protecting this area, blank = none.
Header : .A?? file to show before displaying a
listing of this area, blank = none.
PassOk : Set to TRUE if the user enters a correct
password for this area. This is to prevent
that the user has to type the password more
than once during one session.
Protected : If TRUE, files in this area are not
processed by the maintenance option.
ProcessArch : If TRUE, files in this area are converted to
the default archive-type by RafmChk.
╒═════════════════════════════════════════════════════════════╕
│░░░ RAFMFILE.DAT and RAFMIDX.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
The file RafmFile.Dat is the main database file and contains
all information about the downloadable files on the BBS. Since
this file can become quite large, the RAFMIDX.DAT is used for
quick access.
Type (*RafmFile.Dat*)
FileDataRecord = Record
Name : String[12];
Path : String[50];
Area : Byte;
DownL : Word;
LastAccess,
Date,
Size : Longint;
Desc : String[210];
Uploader : String[35];
PassWord : String[15];
Bits,
PrevArea : Byte;
End;
Name : The name of the file, including extension.
Path : Full path where the file is located.
Area : Number of the area the file is part of.
DownL : Number of times the file has been
downloaded.
LastAccess : Date and time the file was last downloaded.
Date : Date and time of the file.
Size : The size of the file in bytes.
───────────────────────────────────────────────────────────────
Page: 2
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
Desc : Description of the file.
Uploader : Name of the person who uploaded the file.
PassWord : If not empty, users have to enter this
password before they can download the file.
Bits : Various statusbits:
Bitnumber Meaning
0 Free file
1 Private file
2 Checked (processed by RafmChk)
3 Deleted record
4 Protected file (not processed by
the maintenance option)
5 User created archive
6 and 7 Reserved
PrevArea : The area the file was located before being
moved by the maintenance option.
The longints LastAccess and Date are packed DateTime records.
Bits 6 and 7 are reserved for later use, you shouldn't use
them in your program. Bit 3 does NOT indicate that the file
has been erased from disk.
Type (*RafmIdx.Dat*)
IdxRecord = Record
Name : String[12];
Area : Byte;
RecNr : Word;
Date : Longint;
end;
Name, Area and Date are the same as in RafmFile.Dat. RecNr is
the number of the corresponding record in RafmFile.Dat
(linear, 1-based).
╒═════════════════════════════════════════════════════════════╕
│░░░ RAFMPROT.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
RafmProt.Dat contains the information about the external
protocols. It has a fixed length of 8575 bytes (25 records).
Type
ProtocolRecord = Record
Kind : Byte;
Character : Char;
UploadPath,
───────────────────────────────────────────────────────────────
Page: 3
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
DownloadPath : String[80];
Efficiency,
Maxfiles : Byte;
Desc : String[50];
Downkeyword,
Upkeyword : String[20];
DownCount,
DescCount : Byte;
Available : Boolean;
End;
Please read Rafm.Doc for more info about the meaning of these
fields.
╒═════════════════════════════════════════════════════════════╕
│░░░ RAFMCONF.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
RafmConf.Dat contains all other information needed by Rafm.
Type
ConfigRecord = Record
ForeGr,
BackGr,
StatusFore,
StatusBack,
MHigh,
FBack,
FName,
FDate,
FSize,
FDesc,
FCount,
FLast,
FArch,
MoreC : Byte;
DefaultExt : String[3];
PrivateUploads,
CheckDupes,
GlobalDownload,
RestrictUploads :Boolean;
UploadCreditK,
UploadCreditT : Integer;
MinSpace : Longint;
UploadArea : Byte;
DownloadHours : Boolean;
NoDownlAfter,
───────────────────────────────────────────────────────────────
Page: 4
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
NoDownlbefore : Integer;
ConvertArch : String[3];
ConvertDir,
Commentpath : String[50];
LogOff,
CheckVirus,
SearchArch,
ShowArch,
ShowLong,
ShowCounter,
ShowDate,
ShowKb,
ShowNew : Boolean;
TextMissing : String[30];
DateFormat : Byte;
VirusPath,
LogPath : String[50];
Efficiency : Byte;
FreeKb,
FreeFiles : Integer;
TextAdopt : String[210];
SfxReArch,
UseEms,
Swapping : Boolean;
ListMethod : Byte;
DaysInActive,
DaysToKill : Integer;
MoveInActive : Boolean;
InActiveArea : Byte;
KillInActive,
ExtAscii,
AskDays : Boolean;
ArchArea : Byte;
UpdateFilesBbs : Boolean;
ChatReceiveCol,
ChatSendCol,
InverseFore,
InverseBack : Byte;
ActionDup,
ActionArch,
MoveDupTo,
MoveArchTo : Byte;
StampArch : Boolean;
Reserved : Byte;
end;
I think that most fields are selfexplaining, or else you can
easily find out what they mean by looking at RafmEdit. If you
───────────────────────────────────────────────────────────────
Page: 5
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
have diffulties with a field, just send me a message!
╒═════════════════════════════════════════════════════════════╕
│░░░ ALLCONF.DAT ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
Last but not least, AllConf.Dat containing the information for
RafmAll. AllConf.Dat is a file with a fixed length of 4160
bytes, containing 10 records.
Type
AllConfRecord = Record
Areas : Array[1..200] of Boolean;
AllName,
NewName,
Header,
Trailer : String[50];
DaysInClude : Integer;
SepChar : Char;
ShowComm,
ExtAscii,
ShowXfer : Boolean;
Baud : Array[1..3] of Word;
End;
Areas : Each area corresponds with a boolean in this
array. If TRUE, the area has to be placed in
the current listing.
AllName : Full path to the allfiles-listing.
NewName : Full path to the newfiles-listing.
Header : Full path to the ASCII-file which has to be
placed at the beginning of the listings.
Trailer : Like header, but placed at the end of the
listings.
DaysInclude : Determines which files are placed in the
newfiles-listing also.
SepChar : The character to use between each filename.
ShowComm : If TRUE, long comments are written to the
listings.
ExtAscii : If TRUE, RafmAll is allowed to use extended
ASCII (>127).
ShowXfer : If TRUE, RafmAll will place the estimated
time to download the file in the listings.
Baud : Determines the baudrates to be used when
calculating the estimated time to download
the file.
───────────────────────────────────────────────────────────────
Page: 6
RemoteAccess File Manager version 1.11
───────────────────────────────────────────────────────────────
╒═════════════════════════════════════════════════════════════╕
│░░░ Notes about locking and access-modes ░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
During run-time, Rafm opens the configuration-files in Read-
Only, Deny-none mode (64) and closes them directly after
reading. RafmFile.Dat and RafmIdx.Dat are opened in Read-
Write, Deny-none mode (66). If you want your program to run on
a multi-line system, you should open the files in the same
mode, or use Write-only, Deny-none mode (65). Configuration
files may be changed during run-time. Rafm will notice it and
re-read the file as soon as a new menu has to be read from
disk.
Be sure to lock the database and index whenever you
write/update records or else the database could be trashed.
First, lock the record in RafmFile.Dat, then lock the record
in RafmIdx.Dat. After both records are locked, write your
record and unlock immediately.
╒═════════════════════════════════════════════════════════════╕
│░░░ Final ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
╘═════════════════════════════════════════════════════════════╛
If you have any trouble with this document, just let me know!
Also, I would appreciate it if you send me a copy of your
utility (maybe I can use it myself :-)).
Don't forget: these structures will change, probably with
every new version of Rafm. I will try to make each version of
Rafm backwards-compatible, but I can't promise anything.
---=== The End ===---
───────────────────────────────────────────────────────────────
Page: 7